#ifndef __DMAT2_H__
#define __DMAT2_H__

#include "dvec2.h"

namespace libvec
{
  struct mat2;

  struct dmat2
  {
    dvec2 v1, v2;

    dmat2();
    dmat2(mat2 m);
    dmat2(double value);
    dmat2(double n11, double n12, double n21, double n22);
    dmat2(dvec2 v1, dvec2 v2);

    dvec2 &operator[](int index);

    dmat2 operator=(dmat2 m);

    bool operator==(dmat2 m);
    bool operator!=(dmat2 m);

    dmat2 &operator+();
    dmat2 &operator-();

    dmat2 operator+(dmat2 m);
    dmat2 operator+=(dmat2 m);
    dmat2 operator-(dmat2 m);
    dmat2 operator-=(dmat2 m);
    dvec2 operator*(dvec2 v);
    dmat2 operator*(dmat2 m);
    dmat2 operator*=(dmat2 m);
    dmat2 operator*(double scale);
    dmat2 operator*=(double scale);
    dmat2 operator/(double scale);
    dmat2 operator/=(double scale);
  };
}

#endif /* __DMAT2_H__ */
